<%-- 
    Document   : view-rate-data
    Created on : 31 Mei 11, 11:38:37
    Author     : Bayu
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>View Rate Data</title>
    </head>
    <body>
        <h1 align="center">EXCHANGE RATE - PARIN</h1>
        
        <BR>

        
        <br>
        <form method="get">
        <table align="center" width="800">
            <tr>
                <td align="left">
                    Set Maximum Data &nbsp;:&nbsp; <input type="text" name="max" value="${max}">
                    &nbsp;<input type="submit" name="submit" value="View">
                </td>
            </tr>
        </table>
        </form>
        <br>

        <table cellpadding="1" cellspacing="1" bgcolor="#010101" width="800" align="center">
            <tr bgcolor="#ffffff">
                <td><b>Note</b></td>
            </tr>
            <tr bgcolor="#ffffff">
                <td>${note}</td>
            </tr>
            <tr bgcolor="#ffffff" align="right">
                <td>
                    <a href="note-update.htm?id=${idnote}">Edit Notes</a>&nbsp;
                </td>
            </tr>
            

        </table>
            <br>
        

       <table cellpading="1" cellspacing="1" bgcolor="#010101" width="800" align="center">
            <tr bgcolor="#c2c3c4" align="center">
                <td>No</td>
                <td>Remarks</td>
                <td>Rp / 1 USD</td>
                <td>Rp / 1 JPY</td>
                <td>Action</td>

            </tr>
            <c:set var="i" value="1"></c:set>
            <c:forEach items="${data}" var="data">
            <tr bgcolor="#f2f3f4">
                <td>${i}</td>
                <td>${data.remarks}</td>
                <td align="right"><fmt:formatNumber type="number" maxFractionDigits="2" value="${data.rpusd}" /></td>
                <td align="right"><fmt:formatNumber type="number" maxFractionDigits="2" value="${data.rpjpy}" /></td>
                <td>
                    <a href="rate-update.htm?id=${data.id}">Edit</a>&nbsp;
                    <a href="view-rate-data.htm?id=${data.id}">Delete</a>&nbsp;
                </td>
            </tr>
            <c:set var="i" value="${i+1}"></c:set>
            </c:forEach>
        </table>
    </body>
</html>
